$OpenBSD: patch-third_party_bnlib_Makefile_in,v 1.2 2015/05/17 21:16:54 czarkoff Exp $
--- third_party/bnlib/Makefile.in.orig	Sun Mar 17 19:35:45 2013
+++ third_party/bnlib/Makefile.in	Sat May 16 22:24:15 2015
@@ -41,12 +41,9 @@ all: $(BNLIB) bntest32.c bntest64.c
 
 # for libzrtp support
 install: all
-	test -d /usr/local/include/libzrtp || mkdir /usr/local/include/libzrtp
-	cp *.h /usr/local/include/libzrtp
-	cp 'libbn.a' '/usr/local/lib/libbn.a'
-	chmod 644 /usr/local/lib/libbn.a
-	chown 0:0 /usr/local/lib/libbn.a
-	$(RANLIB) '/usr/local/lib/libbn.a'
+	${BSD_INSTALL_DATA_DIR} ${PREFIX}/include/libzrtp
+	${BSD_INSTALL_DATA} *.h ${PREFIX}/include/libzrtp
+	${RANLIB} libbn.a
 
 # for libzrtp support
 #check: bntest
@@ -60,7 +57,7 @@ germtest: germtest.o $(BNLIB)
 	$(LD) $(LDFLAGS) -o $@ germtest.o $(BNLIB) $(LIBS)
 
 $(BNLIB): $(OBJS)
-	$(AR) r $@ $?
+	$(AR) $(ARFLAGS) $@ $?
 	$(RANLIB) $@
 
 # Here we get tricky... if we're compiling with GCC, then GCCMAGIC1 and
